Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LLVM][NewPM] Add a C API for setting the PassBuilder AA pipeline. #102482

Merged
merged 1 commit into from
Aug 14, 2024

Conversation

maleadt
Copy link
Contributor

@maleadt maleadt commented Aug 8, 2024

This PR adds a field to the pass builder options struct, AAPipeline, exposed through a C API LLVMPassBuilderOptionsSetAAPipeline, that is used to set an alias analysis pipeline to be used in stead of the default one.

cc @nikic
x-ref https://discourse.llvm.org/t/newpm-c-api-questions/80598

Copy link
Contributor

@aeubanks aeubanks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, just one nit

@@ -28,11 +29,14 @@ class LLVMPassBuilderOptions {
public:
explicit LLVMPassBuilderOptions(
bool DebugLogging = false, bool VerifyEach = false,
const char *AAPipeline = nullptr,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LLVMPassBuilderOptions is never constructed with params. the constructor shouldn't take any arguments.

I'll do this in a followup patch

llvm/lib/Passes/PassBuilderBindings.cpp Show resolved Hide resolved
Copy link
Contributor

@nikic nikic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

llvm/lib/Passes/PassBuilderBindings.cpp Outdated Show resolved Hide resolved
@maleadt
Copy link
Contributor Author

maleadt commented Aug 13, 2024

I don't have commit bit, so anybody feel free to land this.

@nikic nikic merged commit 241f9e7 into llvm:main Aug 14, 2024
8 checks passed
@maleadt maleadt deleted the newpm_c_aapipeline branch August 14, 2024 07:59
bwendling pushed a commit to bwendling/llvm-project that referenced this pull request Aug 15, 2024
…lvm#102482)

This PR adds a field to the pass builder options struct, `AAPipeline`,
exposed through a C API `LLVMPassBuilderOptionsSetAAPipeline`, that is
used to set an alias analysis pipeline to be used in stead of the
default one.

x-ref https://discourse.llvm.org/t/newpm-c-api-questions/80598
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants